package com.exam.controller;

import com.exam.common.Constants;
import com.exam.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * 商品展示
 */
@Controller
@RequestMapping("wxProduct")
public class ProductController {

    @Autowired
    private ProductService productService;

    @ResponseBody
    @GetMapping("getProductList")
    public List<Map<String, Object>> getProductList(HttpServletRequest request) {
        System.out.println(Constants.userInfo);
        return productService.getProductList(request);
    }



}
